function init(){
    setDatePicker();
    uploadAdvertise($('#frm-advertise'), evtAfterSubmitAdvertise);
}

function uploadAdvertise(form, evtAfterDone){
	form.ajaxForm({
        beforeSend: function() {
            toggleProgressModal(true);
        },
        complete: function(xhr) {
            evtAfterDone(xhr.responseText);
            toggleProgressModal(false);
        }
    });
}

function evtAfterSubmitAdvertise(response){
	var data = $.parseJSON(response);
	setMessage(data);
	resetForm('#frm-advertise');
}